home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / PROGRAMMING / DESKLIBC / SOURCES.ZIP / DeskLib / !DLSources / Libraries / Menu2 / DLL / MakeDLL < prev    next >
Text File  |  1995-07-12  |  3KB  |  135 lines

  1.  
  2. ObjectFiles    =        \
  3.             o.Attach    \
  4.             o.Menu2    \
  5.             o.Msgs    \
  6.  
  7.  
  8. LibName        =    Menu2
  9.  
  10.  
  11.  
  12. # Template makefile to make Straylight Dynamic Link 
  13. # Library from a DeskLib sublibrary's .o files
  14. #
  15. # The DLL is made in the directory 
  16. # '<DeskLib$Dir>.!DLLs.Freeware_1.DeskLib.'
  17. # and has the same name as the DeskLib sublibrary.
  18. #
  19. # Julian Smith 17 Apr 1995.
  20.  
  21. # The macro $(ObjectFiles) should be set at the 
  22. # start of this file, to be a space-separated
  23. # list of object files.
  24. # This is done by 'Makatic'.
  25.  
  26. # The macro $(LibName) should also be set at the 
  27. # start of this file, to be the name of the 
  28. # DeskLib sublibrary.
  29. # This is done by 'Makatic'.
  30.  
  31. # Note that this makefile doesn't use cc at all
  32. # - it merely links existing .o files.
  33.  
  34. # Linker flags, These can be anything. 
  35. # All flags required by Straylight (eg Link -rmf) 
  36. # are included in the $(LINK) macro.
  37. #
  38. LinkFlags    =    $(LinkExtra)
  39.  
  40.  
  41. # Macros for commands, including the Straylight
  42. # tool 'cdll'. Note that DRLink doesn't seem to
  43. # work with the SDLS.
  44. #
  45. LINK        =    Link -rmf
  46. CDLL        =    cdll
  47.  
  48.  
  49. # Filename of the thing we need to make: - the main
  50. # dynamically-linked library, which will go in the 
  51. # !DLL application.
  52. # NB The leafname of $(DLL_Lib) file (after copying into the !DLL
  53. # application) should be the same as the 'name' field in the
  54. # $(DLL_Def) file. In this case, this is $(LibName).
  55. DLL_Lib        =    <DeskLib$Dir>.!DLLs.Freeware_1.DeskLib.$(LibName)
  56.  
  57.  
  58. # Filenames of intermediate files needed to make $(DLL_Lib) and $(DLL_Stubs).
  59. #
  60. DLL_Header    =    Header
  61. DLL_Def        =    ^.DLLDef
  62. DLL_Stubs    =    Stubs
  63.  
  64.  
  65.  
  66. # -------------------------------------------------------
  67. # Everything below here should probably not be changed...
  68. # -------------------------------------------------------
  69.  
  70.  
  71. # Extra libs, written by Straylight, which always need to be linked into a DLL
  72. #
  73. SDLS_ExtraObjects=                    \
  74.             C:DLLLib.o.DLLLib        \
  75.             C:DLLLib.o.dstubs        \
  76.  
  77.  
  78. # Extra DeskLib libraries which need to be linked into the final DLL.
  79. # The DLL DeskLib library is included here because some DeskLib DLLs may
  80. # refer to other DeskLib DLLs.
  81. # Note that DeskLib:o.DLL contains all the DLL.o.* files except for 
  82. # the sublibraries for which there is a DLL - just the DLL Stubs file
  83. # is included for these.
  84. #
  85. DeskLib_ExtraObjects=                \
  86.             DeskLib:o.DLLDLL    \
  87.  
  88.  
  89.  
  90.  
  91. #Here's what we want to make...
  92.  
  93. All:    $(DLL_Lib)
  94.  
  95. $(DLL_Lib):    $(DeskLib_ExtraObjects) $(SDLS_ExtraObjects) $(DLL_Header) $(ObjectFiles)
  96.     $(LINK) $(LinkFlags) -o $@ $(ObjectFiles) $(DeskLib_ExtraObjects) $(SDLS_ExtraObjects) $(DLL_Header)
  97.  
  98.  
  99.  
  100. # Here's how to make the things which are needed in the above rules
  101.  
  102. $(DLL_Def):    
  103.     | Error: No DLL definition file exists.
  104.     |        You should run th MkStubsOs makefile
  105.     |        and then alter the template Def
  106.     |        file by hand.
  107.  
  108. $(DLL_Header):    $(DLL_Def)
  109.     $(CDLL) -def $(DLL_Def) -hdr $(DLL_Header)
  110.  
  111.  
  112. # Rule for compiling C source code for a Straylight dynamically-linked library.
  113. # Actually, we don't call cc - we complain and tell the user to run the 
  114. # MkStubsOs makefile.
  115.  
  116. VPATH = @.^
  117.  
  118. .SUFFIXES:    .o .c .s
  119. .c.o:
  120.     | $@ needs recompiling. This should be done by
  121.     | running the MkStubsOs or MkOs makefile before running
  122.     | this makefile.
  123.     |
  124.  
  125. .s.o:
  126.     | $@ needs assembling. This should be done by
  127.     | running the MkStubsOs or MkOs makefile before running
  128.     | this makefile.
  129.     |
  130.  
  131.  
  132.  
  133. # Dynamic dependencies:
  134.